<?php
namespace Products\Model;

class Bid
{
	public $bid_id;
	public $category_id;
	public $product_id;
	public $user_id;
	public $business_user_id;
	public $biding_quantity;
	public $biding_price;
	public $biding_date_time;
	public $actual_price;
	public $bid_status;
	public $company_name;
	public $genericname;
	public $email;
	public $status;
	public $date;
	public $quntity;
	public $saleing;
	public $type;
	public $updatenote;
	
	public function exchangeArray($data){
	
		$this->bid_id            = (isset($data['bid_id']))         ? $data['bid_id']  : null;
		$this->category_id       = (isset($data['category_id']))    ? $data['category_id']	  : null;		
		$this->product_id        = (isset($data['product_id']))     ? $data['product_id']  : null;		
		$this->user_id           = (isset($data['user_id']))     ? $data['user_id']  : null;		
		$this->business_user_id  = (isset($data['business_user_id'])) ? $data['business_user_id']   : null;
		$this->biding_quantity  = (isset($data['biding_quantity']))   ? $data['biding_quantity']    : null;
		$this->biding_price   = (isset($data['biding_price']))   ? $data['biding_price']   : null;
		$this->biding_date_time   = (isset($data['biding_date_time']))  ? $data['biding_date_time']     : null;
		$this->actual_price   = (isset($data['actual_price']))  ? $data['actual_price']     : null;
		$this->bid_status      = (isset($data['bid_status']))? $data['bid_status']  : null;			
		$this->company_name      = (isset($data['company_name']))? $data['company_name']  : null;
        $this->genericname      = (isset($data['genericname']))? $data['genericname']  : null;		
        $this->email      = (isset($data['email']))? $data['email']  : null;	
        $this->status      = (isset($data['status']))      ?        $data['status']  : null;		
        $this->date      = (isset($data['date']))      ?        $data['date']  : null;		
        $this->quntity      = (isset($data['quntity']))      ?        $data['quntity']  : null;		
        $this->saleing      = (isset($data['saleing']))      ?        $data['saleing']  : null;		
        $this->type      = (isset($data['type']))      ?        $data['type']  : null;	
		$this->updatenote      = (isset($data['updatenote']))      ?        $data['updatenote']  : null;
	}

	// Add the following method:
	public function getArrayCopy()
	{
		return get_object_vars($this);
	}

}